////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#include "WNNetworking/inc/WNConnection.h"
#include "WNCore/inc/WNTypes.h"
#include "WNMemory/inc/WNMemory.h"

WNNetworking::WNConnection::WNConnection() :
    mConnectionName(WN_NULL),
    mIsValid(true){
}

const WN_CHAR* WNNetworking::WNConnection::GetName() {
    return(mConnectionName);
}

WNNetworking::WNConnection::~WNConnection() {
    if(mConnectionName != WN_NULL) {
        WN_DELETE(mConnectionName);
        mConnectionName = WN_NULL;
    }
}

WN_VOID WNNetworking::WNConnection::Invalidate() {
    mIsValid = false;
}

WN_BOOL WNNetworking::WNConnection::IsValid() {
    return(mIsValid);
}